#include<bits/stdc++.h>
using namespace std;
random_device seed;
mt19937 mt(seed());
int main(){
    int n = 200000,r = 25000,q = 200000;
    cout<<n <<' '<<r<<' '<<q<<'\n';
    cout<<mt()%r + 1<<'\n';
    for(int i = 2;i<=n;i++){
        cout<<mt()%(i - 1) + 1<<' '<<mt()%r + 1<<'\n';
    }
    for(int i = 1;i<=q;i++){
        cout<<mt()%r + 1<<' '<<mt()%r + 1<<'\n';
    }
}